package com.base.common.model.request;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * 通用分页请求
 *
 * @author admin
 * @date 2020/5/26 AM9:38
 */
@ApiModel(value = "PageBaseRequest", description = "通用分页请求")
@Data
public class PageRequest extends CommonRequest implements java.io.Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 分页查询参数：查询页码，默认取值为1，即查询第一页
     */
    @ApiModelProperty(notes = "查询页码")
    private Integer current = 0;

    /**
     * 分页查询参数：查询页面数据条数，默认取值为MAX_SIZE
     */
    @ApiModelProperty(notes = "每页条数")
    @Min(value = 1)
    @Max(value = 1000)
    private Integer size = 20;

    /**
     * <p>Title: 构造函数</p>
     */
    public PageRequest() {
    }
}